<html>
	<head>
		<meta http-equiv="Access-Control-Allow-Origin" content="*"> 
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
		<link type="text/css" href="skin.css" rel="stylesheet"  media="screen" />
		<link type="text/css" href="global-struct.css" rel="stylesheet"  media="screen" />
		<script type="text/javascript" src="ajax.js"></script>
		<title>Screaptor</title>
		<script type="text/javascript">
			function DisplayPosts(posts) {
				var topicString = "";
				for (var i = 0; i < posts.length; i++) {
					topicString	+= '<div class="topic"><div class="topicTitle metal"><div class="topicInfo ' + ((posts[i].postType_id == 1) ? 'topicText' : 'topicImage') + '"></div><h3>' + posts[i].title + '</h3><span>' + posts[i].postDate.toString().split("T")[0] +'</span></div><div class="topicContent">' + posts[i].contentHTML + '</div></div>';
				}
				document.getElementById("DataContainer").innerHTML += topicString;
			}
			window.onload = function(){
				loadData(window.location.protocol + "/post", function(res){
					DisplayPosts(JSON.parse(res));
				});
			}
		</script>
	</head>
	<body>
		<header id="Header" class="metal">
			<div class="content">
				<div id="Home">
					<img id="Logo" src="creavisus-logo.png" />
				</div>
				<div id="Navigation">
				</div>
			</div>
		</header>
		<div id="Trunk">
			<div class="push"></div>
			<div id="DataContainer" class="content" >
			</div>
			<div class="push"></div>
		</div>
		<footer id="Footer" class="metal">
			<div class="content">
			</div>
		</footer>
		<script type="text/javascript">
		</script>
	</body>
</html>
